package com.endava.service;

import java.util.List;

import com.endava.dao.UsersDao;
import com.endava.model.Employee;

public class EmployeeServiceImpl implements EmployeeService {

	private UsersDao usersDao;

	public EmployeeServiceImpl(UsersDao usersDao) {
		this.usersDao = usersDao;
	}

	@Override
	public List<Employee> getAllEmployees() {
		return usersDao.getAllEmployees();
	}

	@Override
	public Employee getUserData(String username) {
		return usersDao.getUserData(username);
	}

	@Override
	public Employee deleteEmployeeById(int id) {
		return usersDao.deleteEmployeeById(id);
	}

	@Override
	public Employee getEmployeeById(int id) {
		return usersDao.getEmployeeById(id);
	}

	@Override
	public Employee updateEmployee(int id, String department, double salary) {
		return usersDao.updateEmployeeData(id, department, salary);
	}

}
